//
//  NSObject+Extension.m
//  BTFLove
//
//  Created by yun on 15/6/29.
//  Copyright (c) 2015年 liurg. All rights reserved.
//

#import "NSObject+Extension.h"

@implementation NSObject (Extension)

-(id)inits{
    Class c=[self class];
    NSString*name=[NSString stringWithFormat:@"%@",c];
    id obj=[self getNibFromNibName:name];
    return obj;
}
//xib实例化对象
- (id)getNibFromNibName:(NSString*)nibName{
    NSArray*nibs=[[NSBundle mainBundle] loadNibNamed:nibName owner:nil options:nil];
    id resultObj=[nibs objectAtIndex:0];
    return resultObj;
}


@end
